<template>
	<view>
		<!-- <view class="nav-bar">
			<uni-icons type="back" size="24" @click="goBack" />
			<text class="nav-title"></text>
		</view> -->
		<view class="index-tiku notice-detail" v-if="message_detail.title != undefined">
			<view class="notice-detail-title">{{message_detail.title}}</view>
			<view class="notice-detail-time">
				<view class="pub-gray"></view>
			</view>
			<view class="notice-detail-content">
				<uParse :content="message_detail.content" />
			</view>
		</view>
	</view>
</template>
<script>
	import {
		mapState
	} from 'vuex';
	import uParse from '@/components/uParse/src/wxParse.vue'
	export default {
		data() {
			return {
				message_detail: {},

				pages_params: {}
			}
		},
		onLoad(opts) {
			this.pages_params = opts
			this.get_xiaoxi_detail()
		},
		onShow() {},
		mounted() {},
		computed: {
			...mapState([
				"userInfo"
			]),
		},
		components: {
			uParse
		},
		methods: {
			goBack() {
				uni.navigateBack();
			},
			async get_xiaoxi_detail() {
				let res = await this.$lib.$http.post({
					url: this.$lib.$urlMap.noticeDetail,
					data: {
						id: 5,
					},
					needLogin: true
				})
				if (res.code === 1) {
					this.$lib.getNoticeNum()
					res.data.createtime = this.$lib.$utils.timestampToTime(res.data.createtime)
					this.message_detail = res.data
				} else {
					uni.showToast({
						title: res.msg,
						icon: 'none'
					})
				}
			}
		}
	}
</script>
<style>
	.nav-bar {
		display: flex;
		align-items: center;
		padding: 30rpx;
		background-color: #fff;
		/* border-bottom: 1px solid #eee; */
	}

	.nav-title {
		flex: 1;
		text-align: center;
		font-size: 36rpx;
		font-weight: bold;
	}

	.pub-gray {
		width: 683rpx;
		/* height: 1rpx; */
		border: 1px solid #D2D2D2;
	}

	page {
		background: #fff;
	}

	/*消息详情*/
	.notice-detail {
		width: 92%;
		margin: 12px auto;
		font-size: 16px;
		background: #fff;
	}

	.notice-detail-content image {
		width: 100% !important;
	}

	.notice-detail-title {
		font-size: 18px;
		font-weight: bold;
	}

	.notice-detail-time {
		display: flex;
		font-size: 14px;
		align-items: center;
		margin: 10px 0 9px;
	}

	.notice-detail-blue {
		color: #000;
		font-weight: bold;
		margin-right: 10px;
		font-size: 15px;
	}

	.notice-detail-content {
		line-height: 23px;
	}
</style>